<?php

$str = '<p><img src="/uploads/image/20210113/1610549118_484.jpg" style="" title="1508385632870834.jpg"/></p><p><img src="/uploads/image/20210113/1610549118_8957.jpg" style="" title="1508385632142435.jpg"/></p><p><img src="/uploads/image/20210113/1610549118_15.jpg" style="" title="1508385632129775.jpg"/></p><p><img src="/uploads/image/20210113/1610549119_5610.jpg" style="" title="1508385632627962.jpg"/></p><p><br/></p>';


//过滤图片文件
$pic_arr = array();
preg_match_all("/src=[\"|'|\s]{0,}(\/([^>]*)\.(gif|jpg|png|bmp))/isU", $str, $pic_arr);
$pic_arr = array_unique($pic_arr[1]);
$images = implode(',', $pic_arr);
echo $images;

$oktime2_init = 1673100734;
$today = date("Y-m-d");
$today_datatime = date_create($today);
$end_time = date("Y-m-d", $oktime2_init);
$end_datatime = date_create($end_time);
$day_diff = date_diff($today_datatime, $end_datatime);
$day_diff = $day_diff->format("%R%a");
$day_diff = intval($day_diff);
var_dump($day_diff);


$arr = [
    '053144486',
    '053142282',
    '053138017',
    '053138397',
    '053142217',
    '053142381',
    '053142506',
    '053138199',
    '053139924',
    '053143330',
    '053142399',
    '053142084',
    '053144395',
    '053142001',
    '053144130',
    '053131301',
    '053114166',
    '053139171',
    '053144072',
    '053138041',
    '053143181',
    '053139957',
    '053144320',
    '053114927',
    '053142654',
    '053137928',
    '053138470',
    '053138942',
    '053136318',
    '053137555'
];

$arr2 = [
    '053142217',
    '053138017',
    '053144486',
    '053138397',
    '053131301',
    '053114166',
    '053138199',
    '053142381',
    '053142282',
    '053142506',
    '053138470',
    '053139957',
    '053114927',
    '053138942',
    '053138041',
    '053142571',
    '053143181',
    '053142522',
    '053137407',
    '053144320',
    '053136946',
    '053137555',
    '053136318',
    '053137845',
    '053137951',
    '053137928',
    '053138280',
    '053137837',
    '053142662',
    '053138298'
];

$arr3=array_diff($arr,$arr2);
var_dump($arr3);
